let Build = require("../build/build");
const build = new Build();
let Builder = require("../builder/GpBuilder");
const Define = require("../define");
let utils = require("../utils/utils");

let debug = true;

const args = process.argv;
// utils.logColor('green', args);
if (args.length > 2) {
    debug = args[2] == "true";
    lineFeed = args[3] == "true";
}
const project = Define.PROJECT;
const game = `/Users/wuhaotian/work/cocos/${project}/assets/resources/area/`;
const test = `/Users/wuhaotian/work/cocos/${project}/assets/resources/area/`;
const infoName = "AreaConfig.json";
const input = "/Users/wuhaotian/work/cocos/dev_client/files/old/room_option/";
const output_debug = "/Users/wuhaotian/work/cocos/dev_client/files/gp/";
const output = "/Users/wuhaotian/work/res/serverconfig/mengqi/";
const temp = "/Users/wuhaotian/work/cocos/dev_client/files/gp.txt";

const unable = [];

const limit = Define.DIRS_LIMIT_AREA_DEBUG;
const limit_release = Define.DIRS_LIMIT_AREA;

build.run(
    game,
    infoName,
    input,
    debug ? output_debug : output,
    temp,
    debug ? limit : limit_release,
    unable,
    Builder,
    lineFeed
);
